package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.topic.TopicDateById;
import com.cskaoyan.bean.topic.WxTopicDetailVo;
import com.cskaoyan.bean.wx.topic.Vo.WxTopicListVo;
import com.cskaoyan.bean.wx.topic.WXTopicListBo;
import com.cskaoyan.service.TopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 蒋镇泽
 * @Description:
 * @Date: 2022-06-09-14:02
 */
@RestController
@RequestMapping("wx/topic")
public class WXTopicController {
    @Autowired
    TopicService topicService;
    @RequestMapping("list")
    public BaseRespVo list(WXTopicListBo wxTopicListBo){
        WxTopicListVo wxTopicListVo= topicService.queryList(wxTopicListBo);
       return BaseRespVo.ok(wxTopicListVo);
    }
    @RequestMapping("detail")
    public BaseRespVo detail(String id){
        TopicDateById topicDateById = topicService.queryById(id);
return BaseRespVo.ok(topicDateById);
    }
    @RequestMapping("related")
    public BaseRespVo related(String id){
        WxTopicDetailVo wxTopicDetailVo = topicService.queryDetailById(id);
return BaseRespVo.ok(wxTopicDetailVo);
    }
}
